<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">

    <!--<link rel="stylesheet" href="bootstrap-3.3.5-dist/css/bootstrap.min.css"/>
    <script src="js/jquery-2.1.0.min.js"></script>
    <script src="bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>-->
    <title>患者信息添加</title>

    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>



<!--
    作者：offline
    时间：2019-05-22
    描述：此信息页面用来帮助管理人员添加
    患者信息
-->
<div><h3 align="center" style="margin-bottom: 40px;">患者信息修改</h3> </div>
<form action="/rewritel" method="post" class="form-horizontal">

    <div class="form-group" >
       <!-- <input type="text" name="id" class="col-md-3"/>
        <button type="submit" class="btn col-md-1">查找</button>-->
        <div class="col-md-3 col-md-offset-4">

            <input type="text" class="form-control" placeholder="请输入编号" name="id"/>
        </div>
        <div class="col-md-2">
            <button type="submit" class="form-control btn btn-primary">搜索</button>
        </div>
        <!--<input type="text" class="form-control col-md-2 col-md-offset-1" placeholder="请输入编号" name="id"/>-->
    </div>
</form>
<hr>
<form  action="/add" class="form-horizontal" th:if="${patienti!=null}" th:object="${patienti}">

    <div class="form-group" style="margin-bottom: 40px; margin-top: 40px;" >
        <label for="name1" class="col-md-1 control-label col-md-offset-3">姓名</label>
        <div class="col-md-2">
            <input type="text" class="form-control" name="name" placeholder="name" id="name1" th:value="*{name}"/>
        </div>

        <label for="id1" class="col-md-1 control-label" >编号</label>
        <div class="col-md-2">
            <input type="text" class="form-control"  name="id" id="id1" th:value="*{id}" readonly/>
        </div>
    </div>

    <div class="form-group"  style="margin-bottom: 40px;">
        <label for="sex1" class="col-md-1 control-label col-md-offset-3">性别</label>
        <div class="col-md-2">
            <select class="form-control" name="sex" id="sex1">
                <option value="男" th:selected="${patienti.sex=='男'}?'selected'">男</option>
               <!-- <option  value="女" th:if="${patienti.getSex()!='女'}">女</option>-->
                <option  value="女" th:selected="${patienti.sex=='女'}?'selected'">女</option>
            </select>
        </div>

        <label for="born1" class="col-md-1 control-label" >出生日期</label>
        <div class="col-md-2">
            <input type="date" class="form-control" name="born" placeholder="born" id="born1" th:value="*{born}"/>
        </div>
    </div>

    <div class="form-group"  style="margin-bottom: 40px;">
        <label for="pphone1" class="col-md-1 control-label col-md-offset-3">本人电话</label>
        <div class="col-md-2">
            <input type="tel" class="form-control" name="pphone" placeholder="pphone" id="pphone1" th:value="*{pphone}"/>
        </div>

        <label for="ophone1" class="col-md-1 control-label" >亲友电话</label>
        <div class="col-md-2">
            <input type="tel" class="form-control" name="ophone" placeholder="ophone" id="ophone1" th:value="*{ophone}"/>
        </div>
    </div>

    <div class="form-group"  style="margin-bottom: 40px;">
        <label for="age1" class="col-md-1 control-label col-md-offset-3">年龄</label>
        <div class="col-md-2">
            <input type="number" class="form-control" name="age" placeholder="age" required="ture" id="age1" th:value="*{age}"/>
        </div>

        <label for="ethnic1" class="col-md-1 control-label" >民族</label>
        <div class="col-md-2">
            <input type="text" class="form-control" name="ethnic" placeholder="ethnic" id="ethnic1" th:value="*{ethnic}"/>
        </div>
    </div>

    <div class="form-group"  style="margin-bottom: 40px;">
        <label for="blood1" class="col-md-1 control-label col-md-offset-3">血型</label>
        <div class="radio col-md-2" id="blood1">
            <label>
                <input type="radio" name="blood" value="A型" aria-label="..." th:checked="${patienti.blood=='A型'}?'checked'"/>A型
            </label>
            <label>
                <input type="radio" name="blood" value="B型" aria-label="..." th:checked="${patienti.blood=='B型'}?'checked'" />B型
            </label>
            <label>
                <input type="radio" name="blood" value="O型" aria-label="..." th:checked="${patienti.blood=='O型'}?'checked'"/>O型
            </label>
            <label>
                <input type="radio" name="blood" value="AB型" aria-label="..." th:checked="${patienti.blood=='AB型'}?'checked'"/>AB型
            </label>
            <label>
                <input type="radio" name="blood" value="不详" aria-label="..." th:checked="${patienti.blood=='不详'}?'checked'"/>不详
            </label>
        </div>

        <label for="orderdata1" class="col-md-1 control-label" >预约日期</label>
        <div class="col-md-2 ">
            <input type="date" class="form-control" name="orderdata" placeholder="orderdata" id="orderdata1" th:value="*{orderdata}"/>
        </div>
    </div>

    <div class="form-group"  style="margin-bottom: 40px;">
        <label for="education1" class="col-md-1 control-label col-md-offset-3">学历</label>
        <div class="col-md-2">
            <select class="form-control" name="education" id="education1">
                <option value="大学" th:selected="${patienti.education=='大学'}?'selected'">大学</option>
                <option value="高中" th:selected="${patienti.education=='高中'}?'selected'">高中</option>
                <option value="初中" th:selected="${patienti.education=='初中'}?'selected'">初中</option>
                <option value="小学" th:selected="${patienti.education=='小学'}?'selected'">小学</option>
            </select>
        </div>

        <label for="marry1" class="col-md-1 control-label">婚姻状况</label>
        <div class="col-md-2">
            <select class="form-control" name="marry" id="marry1">
                <option value="结婚" th:selected="${patienti.marry=='结婚'}?'selected'">结婚</option>
                <option value="未婚" th:selected="${patienti.marry=='未婚'}?'selected'">未婚</option>
            </select>
        </div>
    </div>

    <div class="form-group"  style="margin-bottom: 40px;">
        <label for="casehistory1" class="col-md-1 control-label col-md-offset-3">病历</label>
        <textarea class="form-control col-md-offset-4" style="width: 40%;" rows="6" th:text="*{casehistory}" name="casehistory" placeholder="请输入病况" required="ture" id="casehistory1"></textarea>
    </div>

    <div class="form-group"  style="margin-bottom: 40px;">
        <div class="col-md-1 col-md-offset-4">
            <button type="submit" class="btn btn-primary btn-lg">保存</button>
        </div>
        <div class="col-md-1 col-md-offset-1">
            <button type="reset" class="btn btn-danger btn-lg">重置</button>
        </div>
    </div>
</form>

</body>

<script>

</script>
</html>
